package com.boluo.customer.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.boluo.common.annotation.Excel;
import com.boluo.common.core.domain.BaseEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 客户联系人对象 customer_linkman
 * 
 * @author pjh
 * @date 2023-05-02
 */
public class CustomerLinkman extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 序号 */
    private Long id;

    /** 客户 */
    @Excel(name = "客户")
    private Long customerId;

    /** 联系人名字 */
    @Excel(name = "联系人名字")
    private String linkman;

    /** 性别 */
    @NotNull(message = "性别不能为空")
    @Excel(name = "性别")
    private Integer gender;

    /** 年龄 */
    @Excel(name = "年龄")
    private Integer age;

    /** 电话 */
    @Excel(name = "电话")
    private String phone;

    /** 职位 */
    @Length(max = 20)
    @Excel(name = "职位")
    private String position;

    /** 任职状态 */
    @Excel(name = "任职状态")
    private Integer positionState;

    /** 部门 */
    @Length(max = 20)
    @Excel(name = "部门")
    private String department;

    /** 录入人 */
    @Excel(name = "录入人")
    private Long inputUser;

    /** 录入时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "录入时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date inputTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCustomerId(Long customerId) 
    {
        this.customerId = customerId;
    }

    public Long getCustomerId() 
    {
        return customerId;
    }
    public void setLinkman(String linkman) 
    {
        this.linkman = linkman;
    }

    public String getLinkman() 
    {
        return linkman;
    }
    public void setGender(Integer gender) 
    {
        this.gender = gender;
    }

    public Integer getGender() 
    {
        return gender;
    }
    public void setAge(Integer age) 
    {
        this.age = age;
    }

    @Max(value = 100,message = "不得超过100")
    @Min(value = 0)
    public Integer getAge()
    {
        return age;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setPosition(String position) 
    {
        this.position = position;
    }

    @Length(max = 20,message = "长度不能超过20字")
    public String getPosition()
    {
        return position;
    }
    public void setPositionState(Integer positionState) 
    {
        this.positionState = positionState;
    }

    public Integer getPositionState()
    {
        return positionState;
    }
    public void setDepartment(String department) 
    {
        this.department = department;
    }

    @Length(max = 20,message = "长度不能超过20字")
    public String getDepartment() 
    {
        return department;
    }
    public void setInputUser(Long inputUser) 
    {
        this.inputUser = inputUser;
    }

    public Long getInputUser() 
    {
        return inputUser;
    }
    public void setInputTime(Date inputTime) 
    {
        this.inputTime = inputTime;
    }

    public Date getInputTime() 
    {
        return inputTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("customerId", getCustomerId())
            .append("linkman", getLinkman())
            .append("gender", getGender())
            .append("age", getAge())
            .append("phone", getPhone())
            .append("position", getPosition())
            .append("positionState", getPositionState())
            .append("department", getDepartment())
            .append("inputUser", getInputUser())
            .append("inputTime", getInputTime())
            .toString();
    }
}
